package com.tiger.cloud.service.activity;

import com.tiger.cloud.common.exception.ServiceException;
import com.tiger.cloud.common.mybatis.MybatisTigerDao;
import com.tiger.cloud.common.mybatis.TigerBaseService;
import com.tiger.cloud.dao.activity.ActivityDao;
import com.tiger.cloud.model.activity.Activity;
import com.tiger.cloud.model.ext.UserInfos;
import com.tiger.cloud.util.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * activity活动
 */
@Service("activityService")
public class ActivityService extends TigerBaseService<Activity> implements IActivityService{
    
    @Autowired
	private ActivityDao activityDao;

	@Override
	public MybatisTigerDao<Activity> getEntityDao() {
		return activityDao;
	}

	@Override
	public List<Activity> findActivity() throws Exception {
		try {
			return activityDao.findActivity();
		} catch (Exception e){
			throw new ServiceException("查询活动列表失败!");
		}

	}
}